import {CircleCheck, Clock} from "@element-plus/icons-vue";
import {reactive} from "vue";

function taskHook() {
	/* 任务状态列表 */
	const optionsStatue = [
		{
			value: '4',
			label: '待验收',
		},
		{
			value: '0',
			label: '进行中',
		},
		{
			value: '3',
			label: '已超时',
		},
		{
			value: '1',
			label: '已完成',
		},
	]

	/* 任务状态按钮类型列表 */
	const taskStatusList = [ // 任务状态
		{
			icon: Clock,
			type: 'warning',
			name: '进行中',
			status: '0',
			color: '#e6a23c'
		},
		{
			icon: CircleCheck,
			type: 'success',
			name: '已完成',
			status: '1',
			color: '#67c23a'
		},
		{
			icon: CircleCheck,
			type: 'success',
			name: '--',
			status: '2'
		},
		{
			icon: Clock,
			type: 'danger',
			name: '已超时',
			status: '3'
		},
		{
			icon: CircleCheck,
			type: 'danger',
			name: '待验收',
			status: '4'
		}
	]

	/* 优先级列表 */
	const selectPriorityList = reactive([{
		value: '1',
		label: '一级'
	}, {
		value: '2',
		label: '二级'
	}, {
		value: '3',
		label: '三级'
	}, {
		value: '4',
		label: '四级'
	}])
	return {
		optionsStatue,
		taskStatusList,
		selectPriorityList
	}
}

export default taskHook;
